/* 
 * File:   RepositoryOperationResult.h
 * Author: johnneyshi
 *
 * Created on 2013年4月23日, 下午1:20
 */

#ifndef JREPOSITORYOPERATIONRESULT_H
#define	JREPOSITORYOPERATIONRESULT_H
#include <string>
#include <list>
#include "JFile.h"
#include "JDir.h"
#include <ostream>

enum JRepositoryOperationResultEnum
{
    JRepositoryOperationResult_Success,
    JRepositoryOperationResult_AlreadyOper,
    JRepositoryOperationResult_Fail
};


class JRepositoryOperationResult : public JStubArgument
{
public:
    JRepositoryOperationResultEnum result;
    std::string message;
    JRepositoryOperationResult()
    {
        
    }
    virtual ~JRepositoryOperationResult()
    {
        
    }
    int PackStubMessage(JInOutPut& _strea,int& _allSize);
    int UnPackStubMessage(JInOutPut& _strea);
private:

};

class JRepositorySearchResult : public JStubArgument
{
public:
    //Serialize begin.
    std::string fileOrDir;
    std::list<JDir> listDir;
    std::list<JFile> listFile;
    //Serialize end.
    int PackStubMessage(JInOutPut& _strea,int& _allSize);
    int UnPackStubMessage(JInOutPut& _strea);
};
#endif	/* REPOSITORYOPERATIONRESULT_H */

